const {model, helper} = require('thinkorm');
module.exports = class extends model {
    // 构造方法
    init(){
        // 模型名称,映射实体表 user
        this.modelName = 'rooms';
        // 数据表字段信息
        this.fields = {
            id: {
                type: 'integer',
                pk: true
            },
            start_time: {
                type: 'integer',
                index: true,
                defaults: 0
            },
            is_valid: {
                type: 'integer',
                index: true,
                defaults: 0
            },
            user_num: {
                type: 'integer',
                index: true,
                defaults: 0
            },
            end_time: {
                type: 'integer',
                index: true,
                defaults: 0
            },
            password: {
                type:"string",
                size:255,
                defaults:""
            }
        };
    }
}